In [3]:
cd ~/research/TP-AGBcalib/code/TPAGB-calib/


/home/rosenfield/research/TP-AGBcalib/code/TPAGB-calib

In [26]:
from IPython import parallel
from TPAGBparams import snap_src
import ResolvedStellarPops as rsp

In [ ]:
targets = ['ddo71', 'hs117', 'kkh37', 'ngc2976-deep', 'ddo78']
cmd_input = 'CAF09_S_NOV13'.lower()

In [27]:
galaxy_inputs = [snap_src + '/models/varysfh/%s/%s/mc/input_%s_000.dat' % (t, cmd_input, t.upper())
                 for t in targets]
tri_kw = {'rmfiles': False}
outputs = [snap_src + '/models/test/output_%s_%s_000.dat' % (t, cmd_input) for t in targets]

Set up the cluster to have # engines = len(targets)


In [29]:
clients = parallel.Client()
clients.block = False

In [30]:
res = [clients[i].apply(rsp.TrilegalUtils.run_trilegal, 'cmd_input_CAF09_S_NOV13.dat',
                        galaxy_inputs[i], outputs[i], tri_kw,) for i in range(len(galaxy_inputs))]